const int iCompassI2C = 0x60;
  
unsigned long _compass_time = 0;

void _get_body_compass(void)
{
  byte high, low, fine;
  char pitch, roll;
  int bearing;

  Wire.beginTransmission(iCompassI2C);
  Wire.write(0x02);
  Wire.endTransmission();

  Wire.requestFrom(iCompassI2C, 4);
  while(Wire.available() < 4);
  high = Wire.read();
  low = Wire.read();
  pitch = Wire.read();
  roll = Wire.read();

  bearing = ((high<<8)+low);

  body_compass_bearing = bearing/10.f;
  body_compass_pitch = pitch;
  body_compass_roll = roll;
}

void check_body_compass(void)
{
  unsigned long _time_ = millis();
  if(( _time_ - _compass_time) > 45)
  {
    _get_body_compass();
    
    _compass_time = _time_;
  }
}

